package com.example.demo.project;

/**
 * 编辑人：王其
 */
// 定期存款利息计算
public class FixedDepositCalculator implements InterestCalculator {
    // 假设定期年利率为1.5%
    private static final double ANNUAL_INTEREST_RATE = 0.015;

    // 计算并返回定期利息
    @Override
    public double calculateInterest(double principal, int term) {
        return principal * ANNUAL_INTEREST_RATE * term;
    }
}